{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- 订单搜索 -->
<div class="form-div">
  <!-- <form action="javascript:searchOrder()" name="searchForm"> -->
  <form action="distributor.php?act=detailed" name="searchForm" method="post" >
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    用户名<input name="user_name" type="text" id="user_name" size="15">
    手机号<input name="mobile_phone" type="text" id="mobile_phone" size="15">
  <input type="button" value="{$lang.button_search}" class="button" onclick="javascript:searchUser();" />
  </form>
</div>

<!-- 订单列表 -->
  <div class="list-div" id="listDiv">
{/if}
	<table cellpadding="3" cellspacing="1">
	  <tr>
	    <th>用户ID</th>
	    <th>用户名</th>
	    <th>提现账号</th>
	    <th>绑定手机号</th>
	    <th>成为分销商时间</th>
	    <th>二级分销商数量</th>
	    <th>二级分销商总消费</th>
	    <th>未结算提成</th>
	    <th>待结算提成</th>
	    <th>已结算提成</th>
	    <th>操作</th>
	  </tr>
	{foreach from=$result_user item=val key=key}
	 <tr align="center" >
	    <td>{$val.user_id}</td>
	    <td>{$val.user_name}</td>
	    <td>{$val.withdraw_account}</td>
	    <td>{$val.mobile_phone}</td>
	    <td>{$val.agent1_time}</td>
	    <td>{$val.all_user}</td>
	    <td>{$val.all_price}</td>
	    <td><a href="distributor.php?act=commission_detailed&status=0&user_id={$val.user_id}" >{$val.price_0}</a></td>
	    <td><a href="distributor.php?act=commission_detailed&status=1&user_id={$val.user_id}" >{$val.price_1}</a></td>
	    <td><a href="distributor.php?act=commission_detailed&status=2&user_id={$val.user_id}" >{$val.price_2}</a></td>
	    <td>
	    	{if $val.price_1 gt 0}
	    		<a href="distributor.php?act=do_withdraw&user_id={$val.user_id}">完成提现</a>
	    	{else}
	    		-
	    	{/if}
	    </td>
  	</tr>
  	{/foreach}
	</table>

	<!-- 分页 -->
	<table id="page-table" cellspacing="0">
	  <tr>
	    <td align="right" nowrap="true">
	    {include file="page.htm"}
	    </td>
	  </tr>
	</table>
  </div>
{if $full_page}
<script language="JavaScript">
listTable.recordCount = {$filter.record_count};
listTable.pageCount = {$filter.page_count};
listTable.query = "query";
{foreach from=$filter item=item key=key}
listTable.filter.{$key} = '{$item}';
{/foreach}

    /**
     * 搜索
     */
    function searchUser()
    {
    	listTable.filter['user_name'] = document.forms['searchForm'].elements['user_name'].value;
    	listTable.filter['mobile_phone'] = document.forms['searchForm'].elements['mobile_phone'].value;
        listTable.filter['page'] = 1;
        listTable.loadList();
    }



</script>

{include file="pagefooter.htm"}
{/if}